<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>待办事项</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }
        body {
            background-color: #f5f5f5;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
            padding: 20px;
        }
        .todo-app {
            width: 100%;
            max-width: 600px;
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        .todo-header {
            text-align: center;
            margin-bottom: 20px;
        }
        .todo-header h1 {
            color: #6666cc;
            margin-bottom: 5px;
            font-size: 24px;
        }
        .todo-header p {
            color: #757575;
            font-size: 14px;
        }
        .todo-input-area {
            display: flex;
            margin-bottom: 20px;
        }
        .todo-input {
            flex: 1;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            outline: none;
            font-size: 15px;
        }
        .add-btn {
            padding: 10px 20px;
            background: #6666cc;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            margin-left: 8px;
        }
        .filter-buttons {
            display: flex;
            margin-bottom: 20px;
            gap: 10px;
        }
        .filter-btn {
            padding: 5px 12px;
            border: 1px solid #333; 
            border-radius: 15px;
            background: #fff;
            color: #333; 
            cursor: pointer;
            font-size: 14px;
        }
        .filter-btn.active {
            background: rgba(102, 102, 204, 0.1); /* 选中后透明度0.1的紫色背景 */
            color: #6666cc; /* 选中后文字为紫色 */
        }
        .todo-list {
            margin-bottom: 20px;
        }
        .todo-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px;
            border-bottom: 1px solid #f0f0f0;
            animation: fadeIn 0.3s ease-in;
        }
        .todo-item:last-child {
            border-bottom: none;
        }
        .todo-item.completed .todo-text {
            text-decoration: line-through;
            color: #9e9e9e;
        }
        .todo-item .todo-check {
            margin-right: 10px;
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: #6666cc;
        }
        .todo-item .todo-text {
            flex: 1;
        }
        .delete-btn {
            color: #999;
            cursor: pointer;
            font-size: 16px;
            background: none;
            border: none;
            padding: 3px;
        }
        .delete-btn:hover {
            color: #f44336;
        }
        .todo-footer {
            text-align: center;
            padding: 12px;
            color: #757575;
            font-size: 14px;
            border-top: 1px solid #f0f0f0;
            margin-top: 10px;
        }
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @media (max-width: 480px) {
            .todo-input-area {
                flex-direction: column;
            }
            .todo-input {
                margin-bottom: 10px;
            }
            .add-btn {
                width: 100%;
                margin-left: 0;
            }
        }
    </style>
</head>
<body>
    <div class="todo-app">
        <div class="todo-header">
            <h1>待办事项</h1>
            <p>简单高效地管理你的任务</p>
        </div>
        <div class="todo-input-area">
            <input type="text" class="todo-input" placeholder="添加新的待办事项...">
            <button class="add-btn">+ 添加</button>
        </div>
        <div class="filter-buttons">
            <button class="filter-btn active" data-filter="all">全部</button>
            <button class="filter-btn" data-filter="active">未完成</button>
            <button class="filter-btn" data-filter="completed">已完成</button>
        </div>
        <div class="todo-list">
            <!-- 动态生成待办项 -->
        </div>
        <div class="todo-footer">
            <span class="todo-count">0 个未完成，0 个总计</span>
        </div>
    </div>

    <script src="7777.js"></script>
</body>
</html>